
from django.contrib import admin
from django.urls import include
from django.urls import path
from django.urls import register_converter
from meiduo_mall.utils import converters

# 注册转换器,注意转换器的位置，必须在路由列表的前面定义，否则路由列表会找不到转换器。
register_converter(converters.UsernameConverter, "username")

register_converter(converters.MobileConverter, "mobile")

urlpatterns = [
    path('admin/', admin.site.urls),
    path("", include("apps.users.urls")),
    path("", include("apps.verifications.urls")),
    path("", include("apps.oauth.urls")),
    path('', include('apps.areas.urls')),
    path("", include('apps.contents.urls')),
    path("", include('apps.goods.urls')),
    path("", include('apps.carts.urls')),
    path("", include('apps.orders.urls')),
    path("", include('apps.payment.urls')),
    path("meiduo_admin/", include("apps.meiduo_admin.urls")),
]
